package cn.iocoder.yudao.module.mqtt.controller.admin.devicedriver.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import com.alibaba.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 设备驱动 Response VO")
@Data
@ExcelIgnoreUnannotated
public class DeviceDriverRespVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "12291")
    @ExcelProperty("主键ID")
    private Long id;

    @Schema(description = "设备ID", example = "20409")
    @ExcelProperty("设备ID")
    private Long deviceId;

    @Schema(description = "通讯口ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "30740")
    @ExcelProperty("通讯口ID")
    private String commPortId;

    @Schema(description = "驱动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("驱动名称")
    private String driverName;

    @Schema(description = "品牌", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("品牌")
    private String brand;

    @Schema(description = "型号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("型号")
    private String model;

    @Schema(description = "设备地址")
    @ExcelProperty("设备地址")
    private String deviceAddress;

    @Schema(description = "最小采集时间(ms)")
    @ExcelProperty("最小采集时间(ms)")
    private Integer minCollectTime;

    @Schema(description = "通讯等待时间(ms)'")
    @ExcelProperty("通讯等待时间(ms)'")
    private Integer commWaitTime;

    @Schema(description = "16位整型")
    @ExcelProperty(value = "16位整型", converter = DictConvert.class)
    @DictFormat("mqtt_device_int16") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String int16AddressRange;

    @Schema(description = "32/64位整型")
    @ExcelProperty(value = "32/64位整型", converter = DictConvert.class)
    @DictFormat("mqtt_device_int3264") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String  int3264AddressRan;

    @Schema(description = "32/64位浮点型")
    @ExcelProperty(value = "32/64位浮点型", converter = DictConvert.class)
    @DictFormat("mqtt_device_float3264") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String float3264AddressRange;

    @Schema(description = "字符串字节序")
    @ExcelProperty(value = "字符串字节序", converter = DictConvert.class)
    @DictFormat("mqtt_device_stringbyte") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String stringByteOrder;

    @Schema(description = "字符串编码")
    @ExcelProperty(value = "字符串编码", converter = DictConvert.class)
    @DictFormat("mqtt_device_encode") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String stringEncoding;

    @Schema(description = "分块采集方式")
    @ExcelProperty(value = "分块采集方式", converter = DictConvert.class)
    @DictFormat("mqtt_device_block") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String blockCollectMode;

    @Schema(description = "4区16位写功能码")
    @ExcelProperty("4区16位写功能码")
    private String codeWrite;

    @Schema(description = "通讯间隔时间(ms)'")
    @ExcelProperty("通讯间隔时间(ms)'")
    private Integer commIntervalTime;

    @Schema(description = "描述", example = "你说的对")
    @ExcelProperty("描述")
    private String description;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

}